package com.gxa.sso.service;

import com.gxa.sso.entity.User;
import com.gxa.sso.exception.BusinessException;

import java.util.Map;

public interface UserService {
    /**
     * 如果登录成功, 会将token返回给前端
     * @param phone 手机号
     * @param code 收到的短信
     * @return 令牌
     */
    Map<String,String> login(String phone, String code) throws BusinessException;

    User validateToken(String token) throws BusinessException;
}
